From e515fa4fda966aeb493c9c49a1c6128fe376cc34 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 23 Mar 2001 04:24:29 +0000 Subject: [PATCH] (init_iterator): Check WINDOWP before using XWINDOW. (string_buffer_position): Use `make_number'. --- src/xdisp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 274c133aa87..5bef4697058 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1524,6 +1524,7 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) /* Or show the region if we are in the mini-buffer and W is the window the mini-buffer refers to. */ || (MINI_WINDOW_P (XWINDOW (selected_window)) + && WINDOWP (Vminibuf_scroll_window) && w == XWINDOW (Vminibuf_scroll_window)))) { int charpos = marker_position (current_buffer->mark); @@ -3093,7 +3094,7 @@ string_buffer_position (w, string, around_charpos) const int MAX_DISTANCE = 1000; int found = 0; - pos = around_charpos; + pos = make_number (around_charpos); limit = make_number (min (XINT (pos) + MAX_DISTANCE, ZV)); while (!found && !EQ (pos, limit)) { @@ -3106,7 +3107,7 @@ string_buffer_position (w, string, around_charpos) if (!found) { - pos = around_charpos; + pos = make_number (around_charpos); limit = make_number (max (XINT (pos) - MAX_DISTANCE, BEGV)); while (!found && !EQ (pos, limit)) { -- 2.30.2